﻿using System.Collections.Generic;
using Newtonsoft.Json.Linq;

namespace Mrb.Utils
{
    public class JsonConfigObject : IFromJson
    {
        private readonly IDictionary<string, string> _properties = new Dictionary<string, string>();

        public void FromJson(JToken json)
        {
            foreach (JProperty property in json.Children())
            {
                _properties[property.Name] = property.Value.Value<string>();
            }
        }
    }
}